<template>
  <ul class="aui-list aui-media-list wares_list" style="width:100%;background:transparent "
      ref="list">
    <commodity-list v-if="comDetailDataList"
                    v-for="(item,index) in comDetailDataList"
                    :key="index"
                    :islast="index == comDetailDataList.leng -1 "
                    :wrpperHeight="wrpperHeight"
                    :wrpperTop="wrpperTop"
                    :isOpacity="true"
                    ref="commodityList"
                    :detail="item"
                    :comInfor="translateDetailData(item)"
                    :topHeight="topHeight">
    </commodity-list>
  </ul>
</template>

<script>
  // import Hello from './components/Hello'
  import CommodityList from '../../../../real-components/CommodityList';
  import {translateDetailData} from '../../../../utils/TranslateDetailDate';

  export default {
    data() {
      return {};
    },
    components: {
      CommodityList,
    },
    created() {
    },
    mounted() {
    },
    props: {
      comDetailDataList: {
        type: Array,
        default: () => [3],
      },
      topHeight: {
        type: Number,
        default: 0,
      },
      wrpperHeight: {
        type: Number,
        default: 0,
      },
      wrpperTop: {
        type: Number,
        default: 0,
      },
    },
    methods: {
      translateDetailData: translateDetailData,
      refresh() {
        this.$nextTick(() => {
          var commodityList = this.$refs.commodityList;
          if (commodityList) {
            commodityList.map((item, index) => {
              commodityList[index].changStyle();
            });
          }
        });
      },
    },
  };
</script>

<style>

</style>
